﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Dazaza.Framework.Entity
{
    internal interface IEntityDataSource : IEnumerable<string>, IDisposable
    {
        /// <summary>
        /// returns the data contained in the specified column in the row
        /// </summary>
        /// <param name="columnName">column name in the row.</param>
        /// <returns>the value of the specified field in the row.</returns>
        Object this[string columnName]
        {
            get;
        }

        Object this[int iIndex]
        {
            get;
        }

        /// <summary>
        /// indicates if the datasource contains the specified column
        /// </summary>
        /// <param name="columnName">column name</param>
        /// <returns>true if the specified column exists, false otherwise.</returns>
        bool ContainsColumn(string columnName);

    }
}
